package data_structure;

import java.util.ArrayList;
import java.util.List;

public class leetcode_0094 {
    public List<Integer> inorderTraversal(TreeNode root) {
        List<Integer> list=new ArrayList<>();
        mid(list,root);
        return list;
    }
    public void mid(List<Integer> list,TreeNode node){
        if(node==null) return;

        mid(list,node.left);
        list.add(node.val);
        mid(list,node.right);
    }
}
